package com.zbs.framework.dao.phonevcode.repository;

import com.zbs.framework.dao.phonevcode.entity.PhoneVCode;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

/**
 * Create by hh_yao on 2017/12/28.
 */
public interface PhoneVCodeRepository extends JpaRepository<PhoneVCode, Long> , JpaSpecificationExecutor<PhoneVCode> {

    /**
     * 根据手机号码 类型查询验证码
     * @param phone 手机号码
     * @param vType 验证码类型
     * @return
     */
    PhoneVCode findByPhoneAndType(String phone, String vType);
}
